Skip to content

http: fix bug in ntlm_allow=1 handling#869

Merged
mjcheetham merged 1 commit intomicrosoft:vfs-2.53.0from
mjcheetham:ntlm-allow-fix
Mar 26, 2026
Merged

http: fix bug in ntlm_allow=1 handling#869
mjcheetham merged 1 commit intomicrosoft:vfs-2.53.0from
mjcheetham:ntlm-allow-fix

Conversation

@mjcheetham
Copy link
Copy Markdown
Member

In 816db62 (credential: advertise NTLM suppression and allow helpers to re-enable, 2026-02-09), Git learned to advertise that NTLM authentication was suppressed to credential helpers. It also introduced a way to allow credential helpers to opt-back-in to NTLM authentication via the ntlm_allow=1 credential protocol flag.

There is a bug in the logic of 816db62 that means we are responding to the ntlm_allow=1 signal too late in the auth retry codepath; we've already made the second-attempt request!

Move adding of NTLM as a valid auth method to http_request_reauth right after the credential helper is consulted following the first request, but (now) before we made the second request.

Originally merged into Git for Windows in: git-for-windows#6136

In 816db62 (credential: advertise NTLM suppression and allow
helpers to re-enable, 2026-02-09), Git learned to advertise that NTLM
authentication was suppressed to credential helpers. It also introduced
a way to allow credential helpers to opt-back-in to NTLM authentication
via the `ntlm_allow=1` credential protocol flag.

There is a bug in the logic of 816db62 that means we are responding
to the `ntlm_allow=1` signal too late in the auth retry codepath; we've
already made the second-attempt request!

Move adding of NTLM as a valid auth method to `http_request_reauth`
right after the credential helper is consulted following the first
request, but (now) before we made the second request.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
@mjcheetham mjcheetham requested a review from dscho March 26, 2026 12:36
Copy link
Copy Markdown
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the commit that already made it into Git for Windows' main, so: 👍

@mjcheetham mjcheetham enabled auto-merge March 26, 2026 12:38
@mjcheetham mjcheetham merged commit 355e94b into microsoft:vfs-2.53.0 Mar 26, 2026
66 of 70 checks passed
@mjcheetham mjcheetham deleted the ntlm-allow-fix branch March 26, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants